package com.sh.rpc.serializer;

import com.sh.rpc.spi.SpiLoader;

public class SerializerFactory {


    static {
        SpiLoader.load(Serializer.class);
    }

    // 默认序列化器
    private static final Serializer DEFAULT_SERIALIZER = new JdkSerializer();


    // 获取实例
    public static Serializer getInstance(String key) {
        return SpiLoader.getInstance(Serializer.class, key);
    }


/*       System.out.println(Person.class);   // class com.yc.Person
        System.out.println(Person.class.getName());  // com.yc.Person
        System.out.println(Person.class.getSimpleName());  // Person
*/
}
